<?php

class Student_ParameterController extends Zend_Controller_Action
{

    public function init()
    {
        /* Initialize action controller here */
    }

    public function indexAction()
    {
        $param = new Default_Model_ModulesParam();
        $request = $this->getRequest();
        if ($request->isPost()) {
            $this->view->message = Zend_Json::encode($param->saveParam($request));
        }
        $studentForm =   $param->getParamForm('student');
        $this->view->studentForm = $studentForm;
        $scoreForm =   $param->getParamForm('score');
        $this->view->scoreForm = $scoreForm;

        $PARAM_RESOURCE_ID = $this->getRequest()->getPost('PARAM_RESOURCE_ID');
        switch ($PARAM_RESOURCE_ID) {
            case 'score' :
                $this->view->actionId = 1;
                break;
            default :
                $this->view->actionId = 0;
        }
    }


}

